home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
100 Great Games for Palm OS 2
/
PalmV2012301.ISO
/
puzzles
/
Pilot Mines
/
src
/
mine.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-06-01
|
1KB
|
49 lines
#ifndef _MINE_H
#define _MINE_H
#ifdef OLDGCC
/*
* a bug in the gcc port -- it doesn't save %a4, as it isn't
* supposed to be destroyed; SysTraps() however do this casually;
* place these macros in EventHandler routines and callback functions.
*
* the egcs port doesn't have it anymore :-)
*/
register void *reg_a4 asm("%a4");
# define CALLBACK_PROLOGUE \
void *save_a4 = reg_a4; asm("move.l %%a5,%%a4; sub.l #edata,%%a4" : :);
# define CALLBACK_EPILOGUE reg_a4 = save_a4;
#else
# define CALLBACK_PROLOGUE
# define CALLBACK_EPILOGUE
#endif
#define WIDTH 16
#define HEIGHT 14
#define NAMLEN 11
typedef int (*func) (SWord, SWord);
typedef struct {
int version;
Byte options;
Byte level;
Byte minefield[WIDTH][HEIGHT];
Byte done;
Byte seconds;
struct {
char name[NAMLEN];
int score;
ULong date;
} hscore[4][5];
} Game;
extern long score;
extern Game game;
// Insert by Lucas Bremgartner
enum { IsRunning, IsWon, IsLost, IsFinishedWon, IsFinishedLost, IsToBeStarted, Restart, HighScoreWon, HighScoreLost };
// Insert by Lucas Bremgartner (End)
#endif